import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'
import path from 'path'


// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    WindiCSS(),
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  base: './', // 设置打包路径
  server: {
    host: '0.0.0.0',
    // port: VITE_PORT,
    // open: VITE_OPEN,
    hmr: true,
    // proxy: {
    //   '/api/v1': {
    //     target: 'http://leslie.free.vipnps.vip/api/v1',
    //     ws: false,
    //     changeOrigin: true,
    //     rewrite: (path) => path.replace(/^\/api\/v1/, ''),
    //   },
    // },
  },
})
